<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			// 只是声明，没有赋值，现在num的值是undefined
			var num;
			console.log(num)// undefined
			// typeof()判断变量的类型
			console.log(typeof(num))// undefined
			num = 3.14;
			console.log(num);// 3.14
			console.log(typeof(num))// number
			num = null;
			console.log(num);// null
			console.log(typeof(num))// object
			num = "JS";
			console.log(num);// JS
			console.log(typeof(num))// string
		</script>
	</head>
	<body>
	</body>
</html>
